

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <title>{$project.name}-酷代码</title>
    <meta name="baidu-site-verification" content="code-xEvBW4PmsD" />
    <meta name="keywords" content="{:keywords}" />
    <meta name="description" content="酷代码,专业的源代码分享网站,聚合高质量的java/jquery/bootstrap/html/css/php/python源代码" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <script src="{:jquery}"></script>
    <link href="{:bootstrap_min_css}" rel="stylesheet">
    <script src="{:bootstrap_min_js}"></script>

    <link id="hlcss" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/atom-one-dark.min.css" rel="stylesheet">
    <script src="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
    <script src="/js/highlightjs-line-numbers.min.js"></script>
    <!--<script src="https://cdn.bootcdn.net/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>-->

    <link rel="stylesheet" href="/min/?g=css&v={:version}">
    <script src="/min/?g=js&v={:version}"></script>

    <style>


    </style>

</head>
<body class="b23">
<div style="position: fixed;bottom: 1px;right: 1px;z-index: 999;">
    <select name="" id="codeStyleSelector">
        <option value="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/xcode.min.css">xcode</option>
        <option value="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/vs.min.css">vs</option>
        <option value="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/atom-one-dark.min.css" selected>atom-one-dark</option>
        <option value="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/base16/tomorrow-night.min.css">tomorrow-night</option>
        <option value="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.2.0/styles/base16/monokai.min.css">monokai</option>
    </select>
    <script>
        (function () {
            var sel = document.getElementById('codeStyleSelector');
            sel.onchange = sel.onclick = function (){
                localStorage.setItem('codeStyle', sel.value);
                document.getElementById('hlcss').setAttribute('href', sel.value);
            }
            var url = localStorage.getItem('codeStyle');
            if (url) {
                document.querySelector('[value="' + url + '"]').setAttribute('selected', 'selected');
                sel.onclick();
            }
        })();
    </script>
</div>
{include file="inc/header" /}

<div class="container">

    <div class="row">
        <div class="col-md-9 ecol">
            <div class="panel panel-default">
                <div class="panel-heading xzpb">
                    <ol class="breadcrumb">
                        <li><a href="/">酷代码</a></li>
                        <li><a href="/code.html">项目</a></li>
                        <li class="active">{$project.name}</li>
                    </ol>
                    <div id="xzbtn">
                        <?php $user=session('login_user'); ?>
                        {if $user!=null and $user.id==4 }
                        <a href="/project/{$project.id}/edit">
                        <button type="button" class="btn btn-warning">编辑</button>
                        </a>
                        {/if}
                        {if $project.file!=null}
                        <button type="button" class="btn btn-success dlbtn" data-id="{$project.id}">下载</button>
                        {else}
                        <button type="button" class="btn" disabled>无下载资源</button>
                        {/if}
                    </div>

                </div>
                <div class="panel-body">

                    <div class="my-intro">
                        <div id="avatar"><img src="{$project.user.avatar}" alt=""></div>
                        <div class="uinfo">
                            <span id="username" class="sc_username">{$project.user.nickname}</span>
                            <span style="float: right;" class="sc_ctime">{$project.create_time}</span>
                        </div>
                        <div id="title">{$project.name}</div>

                        <div class="p_info">
                            <div class="">下载次数：{$project.down_}</div>
                            <div class="">浏览次数：{$project.view_}</div>
                            <div class="">所需积分：{$project.price}</div>
                        </div>
                        <div id="content" class="wznr w-e-text">
                            {$project.content|raw}
                            <div>
                                {if $project.file!=null}
                                <button type="button" class="btn btn-success dlbtn" data-id="{$project.id}">下载</button>
                                {/if}
                            </div>
                        </div>

                    </div>



                </div>

            </div>
        </div>
        <div class="col-md-3 ecol">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">语言分类</h3>
                </div>
                <div class="panel-body">
                    <div><a href="/code.html">全部</a></div>
                    {volist name="langs" id="c" }
                    <div><a href="/code/{$c.code}.html">{$c.name}</a></div>
                    {/volist}
                </div>
            </div>
        </div>
    </div>
</div>

<script id="tpl1" type="text/html">
    <div style="padding:5px 20px">
    {{ if code==0 }}
    <h5>资源准备就绪，本次下载消耗<font color="#ff8c00">{$project.price}</font>枚硬币，以后重复下载免费</h5>
    <button class="btn btn-success" onclick="window.open('/download/{$project.id}');">下载</button>
    {{ else if code==6 }}
    <h5>资源准备就绪，本次下载<font color="#ff8c00">免费</font></h5>
    <a class="btn btn-success" href="/download/{$project.id}" target="_blank">下载</a>
    {{ else }}
    <h5>无法下载：{{msg}}</h5>
    {{ /if }}
    </div>
</script>

<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.min.js"></script>
<script src="/min/?f=js/p/share.js&v={:version}">


</script>

{include file="inc/footer" /}
</body>
</html>
